
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>RISC-V 中的中断 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-katex/katex.min.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-codeblock-label/block.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-click-reveal/click_reveal.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    


    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="part-3.html" />
    
    
    <link rel="prev" href="part-1.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    实验简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../../notes/log.html">
            
                <a href="../../../notes/log.html">
            
                    
                    更新日志
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">实验之前</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../pre-lab/env.html">
            
                <a href="../../pre-lab/env.html">
            
                    
                    环境部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../../pre-lab/gdb.html">
            
                <a href="../../pre-lab/gdb.html">
            
                    
                    GDB 调试方法*
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">实验指导</li>
        
        
    
        <li class="chapter " data-level="3.1" >
            
                <span>
            
                    
                    实验指导零
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../../lab-0/guide/intro.html">
            
                <a href="../../lab-0/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../../lab-0/guide/part-1.html">
            
                <a href="../../lab-0/guide/part-1.html">
            
                    
                    创建项目
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../../lab-0/guide/part-2.html">
            
                <a href="../../lab-0/guide/part-2.html">
            
                    
                    移除标准库依赖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../../lab-0/guide/part-3.html">
            
                <a href="../../lab-0/guide/part-3.html">
            
                    
                    移除运行时环境依赖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../../lab-0/guide/part-4.html">
            
                <a href="../../lab-0/guide/part-4.html">
            
                    
                    编译为裸机目标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="../../lab-0/guide/part-5.html">
            
                <a href="../../lab-0/guide/part-5.html">
            
                    
                    生成内核镜像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.7" data-path="../../lab-0/guide/part-6.html">
            
                <a href="../../lab-0/guide/part-6.html">
            
                    
                    调整内存布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.8" data-path="../../lab-0/guide/part-7.html">
            
                <a href="../../lab-0/guide/part-7.html">
            
                    
                    重写程序入口点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.9" data-path="../../lab-0/guide/part-8.html">
            
                <a href="../../lab-0/guide/part-8.html">
            
                    
                    使用 QEMU 运行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.10" data-path="../../lab-0/guide/part-9.html">
            
                <a href="../../lab-0/guide/part-9.html">
            
                    
                    接口封装和代码整理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.11" data-path="../../lab-0/guide/summary.html">
            
                <a href="../../lab-0/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" >
            
                <span>
            
                    
                    实验指导一
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="intro.html">
            
                <a href="intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.2" data-path="part-1.html">
            
                <a href="part-1.html">
            
                    
                    什么是中断
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.2.3" data-path="part-2.html">
            
                <a href="part-2.html">
            
                    
                    RISC-V 中的中断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.4" data-path="part-3.html">
            
                <a href="part-3.html">
            
                    
                    程序运行状态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.5" data-path="part-4.html">
            
                <a href="part-4.html">
            
                    
                    状态的保存与恢复
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.6" data-path="part-5.html">
            
                <a href="part-5.html">
            
                    
                    进入中断处理流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.7" data-path="part-6.html">
            
                <a href="part-6.html">
            
                    
                    时钟中断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.8" data-path="summary.html">
            
                <a href="summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" >
            
                <span>
            
                    
                    实验指导二
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="../../lab-2/guide/intro.html">
            
                <a href="../../lab-2/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="../../lab-2/guide/part-1.html">
            
                <a href="../../lab-2/guide/part-1.html">
            
                    
                    动态内存分配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.3" data-path="../../lab-2/guide/part-2.html">
            
                <a href="../../lab-2/guide/part-2.html">
            
                    
                    物理内存探测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.4" data-path="../../lab-2/guide/part-3.html">
            
                <a href="../../lab-2/guide/part-3.html">
            
                    
                    物理内存管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.5" data-path="../../lab-2/guide/summary.html">
            
                <a href="../../lab-2/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" >
            
                <span>
            
                    
                    实验指导三
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.4.1" data-path="../../lab-3/guide/intro.html">
            
                <a href="../../lab-3/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.2" data-path="../../lab-3/guide/part-1.html">
            
                <a href="../../lab-3/guide/part-1.html">
            
                    
                    从虚拟地址到物理地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.3" data-path="../../lab-3/guide/part-2.html">
            
                <a href="../../lab-3/guide/part-2.html">
            
                    
                    修改内核
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.4" data-path="../../lab-3/guide/part-3.html">
            
                <a href="../../lab-3/guide/part-3.html">
            
                    
                    实现页表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.5" data-path="../../lab-3/guide/part-4.html">
            
                <a href="../../lab-3/guide/part-4.html">
            
                    
                    实现内核重映射
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.6" data-path="../../lab-3/guide/part-5.html">
            
                <a href="../../lab-3/guide/part-5.html">
            
                    
                    页面置换*
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.7" data-path="../../lab-3/guide/summary.html">
            
                <a href="../../lab-3/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.5" >
            
                <span>
            
                    
                    实验指导四
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.5.1" data-path="../../lab-4/guide/intro.html">
            
                <a href="../../lab-4/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.2" data-path="../../lab-4/guide/part-1.html">
            
                <a href="../../lab-4/guide/part-1.html">
            
                    
                    线程和进程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.3" data-path="../../lab-4/guide/part-2.html">
            
                <a href="../../lab-4/guide/part-2.html">
            
                    
                    线程的创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.4" data-path="../../lab-4/guide/part-3.html">
            
                <a href="../../lab-4/guide/part-3.html">
            
                    
                    线程的切换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.5" data-path="../../lab-4/guide/part-4.html">
            
                <a href="../../lab-4/guide/part-4.html">
            
                    
                    线程的结束
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.6" data-path="../../lab-4/guide/part-5.html">
            
                <a href="../../lab-4/guide/part-5.html">
            
                    
                    内核栈
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.7" data-path="../../lab-4/guide/part-6.html">
            
                <a href="../../lab-4/guide/part-6.html">
            
                    
                    线程调度
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.8" data-path="../../lab-4/guide/summary.html">
            
                <a href="../../lab-4/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.6" >
            
                <span>
            
                    
                    实验指导五
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.6.1" data-path="../../lab-5/guide/intro.html">
            
                <a href="../../lab-5/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.2" data-path="../../lab-5/guide/part-1.html">
            
                <a href="../../lab-5/guide/part-1.html">
            
                    
                    设备树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.3" data-path="../../lab-5/guide/part-2.html">
            
                <a href="../../lab-5/guide/part-2.html">
            
                    
                    virtio
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.4" data-path="../../lab-5/guide/part-3.html">
            
                <a href="../../lab-5/guide/part-3.html">
            
                    
                    驱动和块设备驱动
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.5" data-path="../../lab-5/guide/part-4.html">
            
                <a href="../../lab-5/guide/part-4.html">
            
                    
                    文件系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.6" data-path="../../lab-5/guide/summary.html">
            
                <a href="../../lab-5/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.7" >
            
                <span>
            
                    
                    实验指导六
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.7.1" data-path="../../lab-6/guide/intro.html">
            
                <a href="../../lab-6/guide/intro.html">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.2" data-path="../../lab-6/guide/part-1.html">
            
                <a href="../../lab-6/guide/part-1.html">
            
                    
                    构建用户程序框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.3" data-path="../../lab-6/guide/part-2.html">
            
                <a href="../../lab-6/guide/part-2.html">
            
                    
                    打包为磁盘镜像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.4" data-path="../../lab-6/guide/part-3.html">
            
                <a href="../../lab-6/guide/part-3.html">
            
                    
                    解析 ELF 文件并创建线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.5" data-path="../../lab-6/guide/part-4.html">
            
                <a href="../../lab-6/guide/part-4.html">
            
                    
                    实现系统调用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.6" data-path="../../lab-6/guide/part-5.html">
            
                <a href="../../lab-6/guide/part-5.html">
            
                    
                    处理文件描述符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.7" data-path="../../lab-6/guide/part-6.html">
            
                <a href="../../lab-6/guide/part-6.html">
            
                    
                    条件变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.8" data-path="../../lab-6/guide/summary.html">
            
                <a href="../../lab-6/guide/summary.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">实验题</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../practice.html">
            
                <a href="../practice.html">
            
                    
                    实验一：中断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../../lab-2/practice.html">
            
                <a href="../../lab-2/practice.html">
            
                    
                    实验二：内存分配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../../lab-3/practice.html">
            
                <a href="../../lab-3/practice.html">
            
                    
                    实验三：虚实地址转换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../../lab-4/practice-1.html">
            
                <a href="../../lab-4/practice-1.html">
            
                    
                    实验四（上）：线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../../lab-4/practice-2.html">
            
                <a href="../../lab-4/practice-2.html">
            
                    
                    实验四（下）：线程调度
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../../lab-6/practice.html">
            
                <a href="../../lab-6/practice.html">
            
                    
                    实验六：系统调用
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">开发笔记</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../../format/partition.html">
            
                <a href="../../format/partition.html">
            
                    
                    文档代码划分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../../format/doc.html">
            
                <a href="../../format/doc.html">
            
                    
                    文档格式规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../../format/code.html">
            
                <a href="../../format/code.html">
            
                    
                    代码格式规范
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >RISC-V 中的中断</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="risc-v-&#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x5BC4;&#x5B58;&#x5668;&#x548C;&#x6307;&#x4EE4;">RISC-V &#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x5BC4;&#x5B58;&#x5668;&#x548C;&#x6307;&#x4EE4;</h2>
<blockquote>
<p><strong>[info] &#x56DE;&#x987E;&#xFF1A;RISC-V &#x4E2D;&#x7684;&#x673A;&#x5668;&#x6001;&#xFF08;Machine Mode&#xFF0C;&#x673A;&#x5668;&#x6A21;&#x5F0F;&#xFF0C;M &#x6A21;&#x5F0F;&#xFF09;</strong></p>
<ul>
<li>&#x662F; RISC-V &#x4E2D;&#x7684;&#x6700;&#x9AD8;&#x6743;&#x9650;&#x6A21;&#x5F0F;&#xFF0C;&#x4E00;&#x4E9B;&#x5E95;&#x5C42;&#x64CD;&#x4F5C;&#x7684;&#x6307;&#x4EE4;&#x53EA;&#x80FD;&#x7531;&#x673A;&#x5668;&#x6001;&#x8FDB;&#x884C;&#x4F7F;&#x7528;&#x3002;</li>
<li>&#x662F;&#x6240;&#x6709;&#x6807;&#x51C6; RISC-V &#x5904;&#x7406;&#x5668;&#x90FD;&#x5FC5;&#x987B;&#x5B9E;&#x73B0;&#x7684;&#x6A21;&#x5F0F;&#x3002;</li>
<li>&#x9ED8;&#x8BA4;&#x6240;&#x6709;&#x4E2D;&#x65AD;&#x5B9E;&#x9645;&#x4E0A;&#x662F;&#x4EA4;&#x7ED9;&#x673A;&#x5668;&#x6001;&#x5904;&#x7406;&#x7684;&#xFF0C;&#x4F46;&#x662F;&#x4E3A;&#x4E86;&#x5B9E;&#x73B0;&#x66F4;&#x591A;&#x529F;&#x80FD;&#xFF0C;&#x673A;&#x5668;&#x6001;&#x4F1A;&#x5C06;&#x67D0;&#x4E9B;&#x4E2D;&#x65AD;&#x4EA4;&#x7531;&#x5185;&#x6838;&#x6001;&#x5904;&#x7406;&#x3002;&#x8FD9;&#x4E9B;&#x5F02;&#x5E38;&#x4E5F;&#x6B63;&#x662F;&#x6211;&#x4EEC;&#x7F16;&#x5199;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x6240;&#x9700;&#x8981;&#x5B9E;&#x73B0;&#x7684;&#x3002;</li>
</ul>
<p><strong>&#x56DE;&#x987E;&#xFF1A;RISC-V &#x4E2D;&#x7684;&#x5185;&#x6838;&#x6001;&#xFF08;Supervisor Mode&#xFF0C;&#x5185;&#x6838;&#x6A21;&#x5F0F;&#xFF0C;S &#x6A21;&#x5F0F;&#xFF09;</strong></p>
<ul>
<li>&#x901A;&#x5E38;&#x4E3A;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x4F7F;&#x7528;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x4E00;&#x4E9B; supervisor &#x7EA7;&#x522B;&#x7684;&#x5BC4;&#x5B58;&#x5668;&#xFF0C;&#x901A;&#x8FC7;&#x8FD9;&#x4E9B;&#x5BC4;&#x5B58;&#x5668;&#x5BF9;&#x4E2D;&#x65AD;&#x548C;&#x865A;&#x62DF;&#x5185;&#x5B58;&#x6620;&#x5C04;&#x8FDB;&#x884C;&#x7BA1;&#x7406;&#x3002;</li>
<li>Unix &#x7CFB;&#x7EDF;&#x4E2D;&#xFF0C;&#x5927;&#x90E8;&#x5206;&#x7684;&#x4E2D;&#x65AD;&#x90FD;&#x662F;&#x5185;&#x6838;&#x6001;&#x7684;&#x7CFB;&#x7EDF;&#x8C03;&#x7528;&#x3002;&#x673A;&#x5668;&#x6001;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5F02;&#x5E38;&#x59D4;&#x6258;&#x673A;&#x5236;&#xFF08;Machine Interrupt Delegation&#xFF09;&#x5C06;&#x4E00;&#x90E8;&#x5206;&#x4E2D;&#x65AD;&#x8BBE;&#x7F6E;&#x4E3A;&#x4E0D;&#x7ECF;&#x8FC7;&#x673A;&#x5668;&#x6001;&#xFF0C;&#x76F4;&#x63A5;&#x7531;&#x5185;&#x6838;&#x6001;&#x5904;&#x7406;</li>
</ul>
</blockquote>
<p>&#x5728;&#x5B9E;&#x9A8C;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x4E3B;&#x8981;&#x5173;&#x5FC3;&#x7684;&#x5C31;&#x662F;&#x5185;&#x6838;&#x6001;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7684;&#x4E00;&#x4E9B;&#x7279;&#x6743;&#x6307;&#x4EE4;&#x548C;&#x5BC4;&#x5B58;&#x5668;&#x3002;&#x5176;&#x4E2D;&#x5173;&#x4E8E;&#x4E2D;&#x65AD;&#x7684;&#x4F1A;&#x5728;&#x672C;&#x7AE0;&#x7528;&#x5230;&#xFF0C;&#x800C;&#x5173;&#x4E8E;&#x5185;&#x5B58;&#x6620;&#x5C04;&#x7684;&#x90E8;&#x5206;&#x5C06;&#x4F1A;&#x5728;&#x7B2C;&#x4E09;&#x90E8;&#x5206;&#x7528;&#x5230;&#x3002;</p>
<h3 id="&#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x5BC4;&#x5B58;&#x5668;">&#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x5BC4;&#x5B58;&#x5668;</h3>
<p>&#x5728;&#x5185;&#x6838;&#x6001;&#x548C;&#x673A;&#x5668;&#x6001;&#x4E2D;&#xFF0C;RISC-V &#x8BBE;&#x8BA1;&#x4E86;&#x4E00;&#x4E9B; CSR&#xFF08;Control and Status Registers&#xFF09;&#x5BC4;&#x5B58;&#x5668;&#x7528;&#x6765;&#x4FDD;&#x5B58;&#x63A7;&#x5236;&#x4FE1;&#x606F;&#x3002;&#x76EE;&#x524D;&#x6211;&#x4EEC;&#x5173;&#x5FC3;&#x7684;&#x662F;&#x5176;&#x4E2D;&#x6D89;&#x53CA;&#x5230;&#x63A7;&#x5236;&#x4E2D;&#x65AD;&#x7684;&#x5BC4;&#x5B58;&#x5668;&#x3002;</p>
<h4 id="&#x53D1;&#x751F;&#x4E2D;&#x65AD;&#x65F6;&#xFF0C;&#x786C;&#x4EF6;&#x81EA;&#x52A8;&#x586B;&#x5199;&#x7684;&#x5BC4;&#x5B58;&#x5668;">&#x53D1;&#x751F;&#x4E2D;&#x65AD;&#x65F6;&#xFF0C;&#x786C;&#x4EF6;&#x81EA;&#x52A8;&#x586B;&#x5199;&#x7684;&#x5BC4;&#x5B58;&#x5668;</h4>
<ul>
<li><p><code>sepc</code><br>&#x5373; Exception Program Counter&#xFF0C;&#x7528;&#x6765;&#x8BB0;&#x5F55;&#x89E6;&#x53D1;&#x4E2D;&#x65AD;&#x7684;&#x6307;&#x4EE4;&#x7684;&#x5730;&#x5740;&#x3002;</p>
<blockquote>
<p>&#x548C;&#x6211;&#x4EEC;&#x4E4B;&#x524D;&#x5B66;&#x7684; MIPS 32 &#x7CFB;&#x7EDF;&#x4E0D;&#x540C;&#xFF0C;RISC-V &#x4E2D;&#x4E0D;&#x9700;&#x8981;&#x8003;&#x8651;&#x5EF6;&#x8FDF;&#x69FD;&#x7684;&#x95EE;&#x9898;&#x3002;&#x4F46;&#x662F; RISC-V &#x4E2D;&#x7684;&#x6307;&#x4EE4;&#x4E0D;&#x5B9A;&#x957F;&#xFF0C;&#x5982;&#x679C;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x9700;&#x8981;&#x6062;&#x590D;&#x5230;&#x5F02;&#x5E38;&#x6307;&#x4EE4;&#x540E;&#x4E00;&#x6761;&#x6307;&#x4EE4;&#x8FDB;&#x884C;&#x6267;&#x884C;&#xFF0C;&#x5C31;&#x9700;&#x8981;&#x6B63;&#x786E;&#x5224;&#x65AD;&#x5C06; <code>pc</code> &#x5BC4;&#x5B58;&#x5668;&#x52A0;&#x4E0A;&#x591A;&#x5C11;&#x5B57;&#x8282;&#x3002;</p>
</blockquote>
</li>
<li><p><code>scause</code><br>&#x8BB0;&#x5F55;&#x4E2D;&#x65AD;&#x662F;&#x5426;&#x662F;&#x786C;&#x4EF6;&#x4E2D;&#x65AD;&#xFF0C;&#x4EE5;&#x53CA;&#x5177;&#x4F53;&#x7684;&#x4E2D;&#x65AD;&#x539F;&#x56E0;&#x3002;</p>
</li>
<li><p><code>stval</code><br><code>scause</code> &#x4E0D;&#x8DB3;&#x4EE5;&#x5B58;&#x4E0B;&#x4E2D;&#x65AD;&#x6240;&#x6709;&#x7684;&#x5FC5;&#x987B;&#x4FE1;&#x606F;&#x3002;&#x4F8B;&#x5982;&#x7F3A;&#x9875;&#x5F02;&#x5E38;&#xFF0C;&#x5C31;&#x4F1A;&#x5C06; <code>stval</code> &#x8BBE;&#x7F6E;&#x6210;&#x9700;&#x8981;&#x8BBF;&#x95EE;&#x4F46;&#x662F;&#x4E0D;&#x5728;&#x5185;&#x5B58;&#x4E2D;&#x7684;&#x5730;&#x5740;&#xFF0C;&#x4EE5;&#x4FBF;&#x4E8E;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x5C06;&#x8FD9;&#x4E2A;&#x5730;&#x5740;&#x6240;&#x5728;&#x7684;&#x9875;&#x9762;&#x52A0;&#x8F7D;&#x8FDB;&#x6765;&#x3002;</p>
</li>
</ul>
<h4 id="&#x6307;&#x5BFC;&#x786C;&#x4EF6;&#x5904;&#x7406;&#x4E2D;&#x65AD;&#x7684;&#x5BC4;&#x5B58;&#x5668;">&#x6307;&#x5BFC;&#x786C;&#x4EF6;&#x5904;&#x7406;&#x4E2D;&#x65AD;&#x7684;&#x5BC4;&#x5B58;&#x5668;</h4>
<ul>
<li><p><code>stvec</code><br>&#x8BBE;&#x7F6E;&#x5185;&#x6838;&#x6001;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#x7684;&#x5165;&#x53E3;&#x5730;&#x5740;&#x3002;&#x5B58;&#x50A8;&#x4E86;&#x4E00;&#x4E2A;&#x57FA;&#x5740; BASE &#x548C;&#x6A21;&#x5F0F; MODE&#xFF1A;</p>
<ul>
<li><p>MODE &#x4E3A; 0 &#x8868;&#x793A; Direct &#x6A21;&#x5F0F;&#xFF0C;&#x5373;&#x9047;&#x5230;&#x4E2D;&#x65AD;&#x4FBF;&#x8DF3;&#x8F6C;&#x81F3; BASE &#x8FDB;&#x884C;&#x6267;&#x884C;&#x3002;</p>
</li>
<li><p>MODE &#x4E3A; 1 &#x8868;&#x793A; Vectored &#x6A21;&#x5F0F;&#xFF0C;&#x6B64;&#x65F6; BASE &#x5E94;&#x5F53;&#x6307;&#x5411;&#x4E00;&#x4E2A;&#x5411;&#x91CF;&#xFF0C;&#x5B58;&#x6709;&#x4E0D;&#x540C;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#x7684;&#x5730;&#x5740;&#xFF0C;&#x9047;&#x5230;&#x4E2D;&#x65AD;&#x4F1A;&#x8DF3;&#x8F6C;&#x81F3; <code>BASE + 4 * cause</code> &#x8FDB;&#x884C;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#x3002;</p>
</li>
</ul>
</li>
<li><p><code>sstatus</code><br>&#x5177;&#x6709;&#x8BB8;&#x591A;&#x72B6;&#x6001;&#x4F4D;&#xFF0C;&#x63A7;&#x5236;&#x5168;&#x5C40;&#x4E2D;&#x65AD;&#x4F7F;&#x80FD;&#x7B49;&#x3002;</p>
</li>
<li><p><code>sie</code><br>&#x5373; Supervisor Interrupt Enable&#xFF0C;&#x7528;&#x6765;&#x63A7;&#x5236;&#x5177;&#x4F53;&#x7C7B;&#x578B;&#x4E2D;&#x65AD;&#x7684;&#x4F7F;&#x80FD;&#xFF0C;&#x4F8B;&#x5982;&#x5176;&#x4E2D;&#x7684; STIE &#x63A7;&#x5236;&#x65F6;&#x949F;&#x4E2D;&#x65AD;&#x4F7F;&#x80FD;&#x3002;</p>
</li>
<li><p><code>sip</code><br>&#x5373; Supervisor Interrupt Pending&#xFF0C;&#x548C; <code>sie</code> &#x76F8;&#x5BF9;&#x5E94;&#xFF0C;&#x8BB0;&#x5F55;&#x6BCF;&#x79CD;&#x4E2D;&#x65AD;&#x662F;&#x5426;&#x88AB;&#x89E6;&#x53D1;&#x3002;&#x4EC5;&#x5F53; <code>sie</code> &#x548C; <code>sip</code> &#x7684;&#x5BF9;&#x5E94;&#x4F4D;&#x90FD;&#x4E3A; 1 &#x65F6;&#xFF0C;&#x610F;&#x5473;&#x7740;&#x5F00;&#x4E2D;&#x65AD;&#x4E14;&#x5DF2;&#x53D1;&#x751F;&#x4E2D;&#x65AD;&#xFF0C;&#x8FD9;&#x65F6;&#x4E2D;&#x65AD;&#x6700;&#x7EC8;&#x89E6;&#x53D1;&#x3002;</p>
</li>
</ul>
<h4 id="sscratch"><code>sscratch</code></h4>
<p>&#xFF08;&#x8FD9;&#x4E2A;&#x5BC4;&#x5B58;&#x5668;&#x7684;&#x7528;&#x5904;&#x4F1A;&#x5728;&#x5B9E;&#x73B0;&#x7EBF;&#x7A0B;&#x65F6;&#x8D77;&#x5230;&#x4F5C;&#x7528;&#xFF0C;&#x76EE;&#x524D;&#x4EC5;&#x4E86;&#x89E3;&#x5373;&#x53EF;&#xFF09;</p>
<p>&#x5728;&#x7528;&#x6237;&#x6001;&#xFF0C;<code>sscratch</code> &#x4FDD;&#x5B58;&#x5185;&#x6838;&#x6808;&#x7684;&#x5730;&#x5740;&#xFF1B;&#x5728;&#x5185;&#x6838;&#x6001;&#xFF0C;<code>sscratch</code> &#x7684;&#x503C;&#x4E3A; 0&#x3002;</p>
<p>&#x4E3A;&#x4E86;&#x80FD;&#x591F;&#x6267;&#x884C;&#x5185;&#x6838;&#x6001;&#x7684;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#xFF0C;&#x4EC5;&#x6709;&#x4E00;&#x4E2A;&#x5165;&#x53E3;&#x5730;&#x5740;&#x662F;&#x4E0D;&#x591F;&#x7684;&#x3002;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#x5F88;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x6808;&#xFF0C;&#x800C;&#x7A0B;&#x5E8F;&#x5F53;&#x524D;&#x7684;&#x7528;&#x6237;&#x6808;&#x662F;&#x4E0D;&#x5B89;&#x5168;&#x7684;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x6211;&#x4EEC;&#x8FD8;&#x9700;&#x8981;&#x4E00;&#x4E2A;&#x9884;&#x8BBE;&#x7684;&#x5B89;&#x5168;&#x7684;&#x6808;&#x7A7A;&#x95F4;&#xFF0C;&#x5B58;&#x653E;&#x5728;&#x8FD9;&#x91CC;&#x3002;</p>
<p>&#x5728;&#x5185;&#x6838;&#x6001;&#x4E2D;&#xFF0C;<code>sp</code> &#x53EF;&#x4EE5;&#x8BA4;&#x4E3A;&#x662F;&#x4E00;&#x4E2A;&#x5B89;&#x5168;&#x7684;&#x6808;&#x7A7A;&#x95F4;&#xFF0C;<code>sscratch</code> &#x4FBF;&#x4E0D;&#x9700;&#x8981;&#x4FDD;&#x5B58;&#x4EFB;&#x4F55;&#x503C;&#x3002;&#x6B64;&#x65F6;&#x5C06;&#x5176;&#x8BBE;&#x4E3A; 0&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x9047;&#x5230;&#x4E2D;&#x65AD;&#x65F6;&#x901A;&#x8FC7; <code>sscratch</code> &#x4E2D;&#x7684;&#x503C;&#x5224;&#x65AD;&#x4E2D;&#x65AD;&#x524D;&#x7A0B;&#x5E8F;&#x662F;&#x5426;&#x5904;&#x4E8E;&#x5185;&#x6838;&#x6001;&#x3002;</p>
<h3 id="&#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x6307;&#x4EE4;">&#x4E0E;&#x4E2D;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x6307;&#x4EE4;</h3>
<h4 id="&#x8FDB;&#x5165;&#x548C;&#x9000;&#x51FA;&#x4E2D;&#x65AD;">&#x8FDB;&#x5165;&#x548C;&#x9000;&#x51FA;&#x4E2D;&#x65AD;</h4>
<ul>
<li><p><code>ecall</code><br>&#x89E6;&#x53D1;&#x4E2D;&#x65AD;&#xFF0C;&#x8FDB;&#x5165;&#x66F4;&#x9AD8;&#x4E00;&#x5C42;&#x7684;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#x4E4B;&#x4E2D;&#x3002;&#x7528;&#x6237;&#x6001;&#x8FDB;&#x884C;&#x7CFB;&#x7EDF;&#x8C03;&#x7528;&#x8FDB;&#x5165;&#x5185;&#x6838;&#x6001;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#xFF0C;&#x5185;&#x6838;&#x6001;&#x8FDB;&#x884C; SBI &#x8C03;&#x7528;&#x8FDB;&#x5165;&#x673A;&#x5668;&#x6001;&#x4E2D;&#x65AD;&#x5904;&#x7406;&#x6D41;&#x7A0B;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x90FD;&#x662F;&#x8FD9;&#x6761;&#x6307;&#x4EE4;&#x3002;</p>
</li>
<li><p><code>sret</code><br>&#x4ECE;&#x5185;&#x6838;&#x6001;&#x8FD4;&#x56DE;&#x7528;&#x6237;&#x6001;&#xFF0C;&#x540C;&#x65F6;&#x5C06; <code>pc</code> &#x7684;&#x503C;&#x8BBE;&#x7F6E;&#x4E3A; <code>sepc</code>&#x3002;&#xFF08;&#x5982;&#x679C;&#x9700;&#x8981;&#x8FD4;&#x56DE;&#x5230; <code>sepc</code> &#x540E;&#x4E00;&#x6761;&#x6307;&#x4EE4;&#xFF0C;&#x5C31;&#x9700;&#x8981;&#x5728; <code>sret</code> &#x4E4B;&#x524D;&#x4FEE;&#x6539; <code>sepc</code> &#x7684;&#x503C;&#xFF09;</p>
</li>
<li><p><code>ebreak</code><br>&#x89E6;&#x53D1;&#x4E00;&#x4E2A;&#x65AD;&#x70B9;&#x3002;</p>
</li>
<li><p><code>mret</code><br>&#x4ECE;&#x673A;&#x5668;&#x6001;&#x8FD4;&#x56DE;&#x5185;&#x6838;&#x6001;&#xFF0C;&#x540C;&#x65F6;&#x5C06; <code>pc</code> &#x7684;&#x503C;&#x8BBE;&#x7F6E;&#x4E3A; <code>mepc</code>&#x3002;</p>
</li>
</ul>
<h4 id="&#x64CD;&#x4F5C;-csr">&#x64CD;&#x4F5C; CSR</h4>
<p>&#x53EA;&#x6709;&#x4E00;&#x7CFB;&#x5217;&#x7279;&#x6B8A;&#x7684;&#x6307;&#x4EE4;&#xFF08;CSR Instruction&#xFF09;&#x53EF;&#x4EE5;&#x8BFB;&#x5199; CSR&#x3002;&#x5C3D;&#x7BA1;&#x6240;&#x6709;&#x6A21;&#x5F0F;&#x90FD;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x8FD9;&#x4E9B;&#x6307;&#x4EE4;&#xFF0C;&#x7528;&#x6237;&#x6001;&#x53EA;&#x80FD;&#x53EA;&#x8BFB;&#x7684;&#x8BBF;&#x95EE;&#x67D0;&#x51E0;&#x4E2A;&#x5BC4;&#x5B58;&#x5668;&#x3002;</p>
<p>&#x4E3A;&#x4E86;&#x8BA9;&#x64CD;&#x4F5C; CSR &#x7684;&#x6307;&#x4EE4;&#x4E0D;&#x88AB;&#x5E72;&#x6270;&#xFF0C;&#x8BB8;&#x591A; CSR &#x6307;&#x4EE4;&#x90FD;&#x662F;&#x7ED3;&#x5408;&#x4E86;&#x8BFB;&#x5199;&#x7684;&#x539F;&#x5B50;&#x64CD;&#x4F5C;&#x3002;&#x4E0D;&#x8FC7;&#x5728;&#x5B9E;&#x9A8C;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x53EA;&#x7528;&#x5230;&#x51E0;&#x4E2A;&#x7B80;&#x5355;&#x7684;&#x6307;&#x4EE4;&#x3002;</p>
<ul>
<li><p><code>csrrw dst, csr, src</code>&#xFF08;CSR Read Write&#xFF09;<br>&#x540C;&#x65F6;&#x8BFB;&#x5199;&#x7684;&#x539F;&#x5B50;&#x64CD;&#x4F5C;&#xFF0C;&#x5C06;&#x6307;&#x5B9A; CSR &#x7684;&#x503C;&#x5199;&#x5165; <code>dst</code>&#xFF0C;&#x540C;&#x65F6;&#x5C06; <code>src</code> &#x7684;&#x503C;&#x5199;&#x5165; CSR&#x3002;</p>
</li>
<li><p><code>csrr dst, csr</code>&#xFF08;CSR Read&#xFF09;<br>&#x4EC5;&#x8BFB;&#x53D6;&#x4E00;&#x4E2A; CSR &#x5BC4;&#x5B58;&#x5668;&#x3002;</p>
</li>
<li><p><code>csrw csr, src</code>&#xFF08;CSR Write&#xFF09;<br>&#x4EC5;&#x5199;&#x5165;&#x4E00;&#x4E2A; CSR &#x5BC4;&#x5B58;&#x5668;&#x3002;</p>
</li>
<li><p><code>csrc(i) csr, rs1</code>&#xFF08;CSR Clear&#xFF09;<br>&#x5C06; CSR &#x5BC4;&#x5B58;&#x5668;&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x4F4D;&#x6E05;&#x96F6;&#xFF0C;<code>csrc</code> &#x4F7F;&#x7528;&#x901A;&#x7528;&#x5BC4;&#x5B58;&#x5668;&#x4F5C;&#x4E3A; mask&#xFF0C;<code>csrci</code> &#x5219;&#x4F7F;&#x7528;&#x7ACB;&#x5373;&#x6570;&#x3002;</p>
</li>
<li><p><code>csrs(i) csr, rs1</code>&#xFF08;CSR Set&#xFF09;<br>&#x5C06; CSR &#x5BC4;&#x5B58;&#x5668;&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x4F4D;&#x7F6E; 1&#xFF0C;<code>csrc</code> &#x4F7F;&#x7528;&#x901A;&#x7528;&#x5BC4;&#x5B58;&#x5668;&#x4F5C;&#x4E3A; mask&#xFF0C;<code>csrci</code> &#x5219;&#x4F7F;&#x7528;&#x7ACB;&#x5373;&#x6570;&#x3002;</p>
</li>
</ul>
<h3 id="&#x4E86;&#x89E3;&#x66F4;&#x591A;">&#x4E86;&#x89E3;&#x66F4;&#x591A;</h3>
<p>RISC-V &#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF1A;</p>
<ul>
<li><p>CSR &#x5BC4;&#x5B58;&#x5668;&#xFF08;Chapter 4&#xFF0C;p59&#xFF09;<br><a href="https://content.riscv.org/wp-content/uploads/2017/05/riscv-privileged-v1.10.pdf" target="_blank">https://content.riscv.org/wp-content/uploads/2017/05/riscv-privileged-v1.10.pdf</a></p>
</li>
<li><p>CSR &#x6307;&#x4EE4;&#xFF08;Section 2.8&#xFF0C;p33&#xFF09;<br><a href="https://content.riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf" target="_blank">https://content.riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf</a></p>
</li>
</ul>
<p><div id="page-footer" class="localized-footer"><hr><p><link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css"></p>
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
    var gitalk = new Gitalk({
        clientID: "5084c46751a4b2f7cd4d",
        clientSecret: "3904f62d33aef24f19480fedc836a48b31d532e9",
        repo: "rCore-Tutorial-deploy",
        owner: "rcore-os",
        admin: [
            "chyyuu",
            "wangrunji0408",
            "xy-plus",
            "wyfcyx",
            "LyricZhao",
            "Tuyixiang"
        ],
        id: location.pathname.replace('/rCore-Tutorial-deploy', '').replace('.html', ''),
        distractionFreeMode: false
    });
    gitalk.render("gitalk-container");
</script></div></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="part-1.html" class="navigation navigation-prev " aria-label="Previous page: 什么是中断">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="part-3.html" class="navigation navigation-next " aria-label="Next page: 程序运行状态">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"RISC-V 中的中断","level":"3.2.3","depth":2,"next":{"title":"程序运行状态","level":"3.2.4","depth":2,"path":"docs/lab-1/guide/part-3.md","ref":"docs/lab-1/guide/part-3.md","articles":[]},"previous":{"title":"什么是中断","level":"3.2.2","depth":2,"path":"docs/lab-1/guide/part-1.md","ref":"docs/lab-1/guide/part-1.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["hide-element","chapter-fold","katex","alerts","emphasize","mermaid-gb3","codeblock-label","code","search-pro","click-reveal","expandable-chapters-interactive","localized-footer"],"pluginsConfig":{"chapter-fold":{},"emphasize":{},"codeblock-label":{},"search-pro":{},"search":{},"localized-footer":{"filename":"gitalk.html","hline":"true"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"hide-element":{},"katex":{},"fontsettings":{"theme":"white","family":"sans","size":1},"click-reveal":{},"highlight":{},"mermaid-gb3":{},"expandable-chapters-interactive":{},"alerts":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"docs/lab-1/guide/part-2.md","mtime":"2020-10-01T11:39:40.507Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-10-01T11:40:38.595Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-alerts/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-click-reveal/click_reveal.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    <script src="../../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>

    </body>
</html>

